﻿using System;
using System.Collections.Generic;
using System.Collections.Concurrent;
using Ue.CQRS.DistributionManager;
using Ue.CQRS.Events;

namespace Ue.CQRS.Bus
{
    public class DirectBus : IBus
    {
        public DirectBus(IDistributor dispatcher)
        {
            this.Distributor = dispatcher;
        }

        private IDistributor Distributor { get; set; }

        public void Send(IEvent @event)
        {
            this.Distributor.Dispatch(@event);
        }
    }
}
